<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/sks/cms/page/share/taglib.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="districtJavaScript.jsp" %>
<%
String path = request.getContextPath(); 
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 
String menuName = request.getParameter("menuName") == null ? "" : (String)request.getParameter("menuName");
boolean isCollected = (Boolean) request.getAttribute("isCollected") != null ? (Boolean) request.getAttribute("isCollected") : false;
%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="租房,买房,三棵松,地产,中介" />
<meta name="description" content="三棵松地产" />
<title>三棵松地产</title>
<link rel="stylesheet" type="text/css" media="screen"
	href="<%=basePath %>sks/css/frontpages/houseList.css" />
<link rel="stylesheet" type="text/css" media="screen"
	href="<%=basePath %>sks/css/frontpages/common.css" />
<link rel="stylesheet" type="text/css" media="screen"
	href="<%=basePath %>sks/css/frontpages/BrightSide.css" />
<link rel="stylesheet" type="text/css" media="screen"
	href="<%=basePath %>sks/css/frontpages/mytestcss.css" />
<link rel="stylesheet" type="text/css" media="screen"
	href="<%=basePath %>sks/frontpages/district/district.css" />
<script type="text/javascript" src="/js/jquery-1.3.1.min.js"></script>	
<script type="text/javascript" src="<%=basePath %>sks/js/frontpages/jquery.cookie.js"></script>
<script type="text/javascript">
function submitForm() {
	document.houseForm.submit();
}
function setHouseType(id) {
	document.houseForm.houseTypeId.value = id;
	submitForm();
}
function setPropertyType(id) {
	document.houseForm.propertyTypeId.value = id;
	submitForm();
}
function setOrderBy(order) {
	document.houseForm.orderBy.value = order;
	submitForm();
}
function setPrice(minPrice, maxPrice) {
	document.houseForm.minPrice.value = minPrice;
	document.houseForm.maxPrice.value = maxPrice;
	submitForm();
}
</script>
</head>
<body onload="javascript:changeMenu('<%=menuName%>');">
	<div class="wrap">
		<jsp:include page="../header.jsp"></jsp:include>
		<div class="nav-line">
			<a href="<%=basePath %>">SKS房地产</a>
			&gt; <a
				href="<%=basePath %>sks/district.do?method=list&menuName=village">
				小区</a> &gt; ${building.name }

		</div>
		<div id="clear"></div>

		<form
			action="<%=basePath %>sks/districtInfo.do?method=houseRentList&menuName=village&buildingId=${building.buildingId }&isRent=Rent"
			" id="houseForm" name="houseForm" method="post">
			<input name="houseTypeId" type="hidden"
				value="${houseForm.houseTypeId}" /> <input name="propertyTypeId"
				type="hidden" value="${houseForm.propertyTypeId}" /> <input
				name="transaStatus" type="hidden" value="${houseForm.transaStatus}" />
			<input name="orderBy" type="hidden" value="${houseForm.orderBy}" /> <input
				name="maxPrice" type="hidden" value="${houseForm.maxPrice}" /> <input
				name="minPrice" type="hidden" value="${houseForm.minPrice}" /> <input
				name="menuName" type="hidden" value="<%=menuName%>" />
			<input id="buildingId" type="hidden" value=${building.buildingId }>
			<div class="bc standw">
				<!--切换标签 star-->
				<div class="sxq_xqheadtab clearfix">
					<div class="tab_menu">
    	<div class="menu">
    	    	<a href="<%=basePath%>sks/districtInfo.do?method=base&menuName=village&buildingId=${building.buildingId }" >小区概况<span></span></a>
    	    	    	<a href="<%=basePath%>sks/districtInfo.do?method=photo&menuName=village&buildingId=${building.buildingId }" >小区照片<span></span></a>
    	    	    	    	<a href="<%=basePath%>sks/districtInfo.do?method=map&menuName=village&buildingId=${building.buildingId }" >小区地图<span></span></a>
    	<a href="<%=basePath%>sks/districtInfo.do?method=houseSaleList&menuName=village&buildingId=${building.buildingId }&isRent=Buy" >出售房源<span></span></a>
    	<a href="<%=basePath%>sks/districtInfo.do?method=houseRentList&menuName=village&buildingId=${building.buildingId }" class="on">出租房源<span></span></a>
		<a href="<%=basePath%>sks/districtInfo.do?method=detail&menuName=village&buildingId=${building.buildingId }">周边配套<span></span>
						</a>
    	    	</div>
    	    	<div style="clear: both;" ></div>
						<a href="javascript:void(0);" id="collectDistrict"
							onclick="<%= isCollected ? "del_attentioncommunity()" : "add_attentioncommunity()"%>"
							class="sc_link""><%= isCollected ? "取消收藏" : "收藏小区"%></a>
					</div>
				</div>
				<div class="headMetro_listing box">
					<!-- 搜索 -->
					<div class="head_listing_nav">
						<div class="headMetroList">
							<!-- 租金 -->
							<div class="listing_price">
								<span>租金：</span> <a id="priceRange"
									href="javascript:setPrice(null, null);" title="不限">不限</a> <a
									href="javascript:setPrice(0, 500);" title="500以下"
									id="priceRange0">500以下</a> <a
									href="javascript:setPrice(500, 1000);" title="500-1000"
									id="priceRange500">500-1000</a> <a
									href="javascript:setPrice(1000, 2000);" title="1000-2000"
									id="priceRange1000">1000-2000</a> <a
									href="javascript:setPrice(2000, 3000);" title="2000-3000"
									id="priceRange2000">2000-3000</a> <a
									href="javascript:setPrice(3000, 4000);" title="3000-4000"
									id="priceRange3000">3000-4000</a> <a
									href="javascript:setPrice(4000, 5000);" title="4000-5000"
									id="priceRange4000">4000-5000</a> <a
									href="javascript:setPrice(5000, 8000);" title="5000-8000"
									id="priceRange5000">5000-8000</a> <a
									href="javascript:setPrice(8000, 10000);" title="8000-10000"
									id="priceRange8000">8000-10000</a> <a
									href="javascript:setPrice(10000, 9999999);" title="10000以上"
									id="priceRange10000">10000以上</a>
							</div>
							<!-- 房型 -->
							<div class="listing_bedroom">
								<span>房型：</span> <a id="houseTypeNotLimit"
									href="javascript:setHouseType(null);">不限</a>
								<c:forEach var="ht" items="${houseTypes}">
									<a href="javascript:setHouseType('${ht.houseTypeId}');"
										title="${ht.name}"
										<c:if test="${ht.houseTypeId eq houseForm.houseTypeId}">style="font-weight:bold"</c:if>>${ht.name}</a>
								</c:forEach>
							</div>
							<!-- 类型 -->
							<div class="listing_type">
								<span>类型：</span> <a id="propertyTypeNotLimit"
									href="javascript:setPropertyType(null);">不限</a>
								<c:forEach var="pt" items="${propertyTypes}">
									<a href="javascript:setPropertyType('${pt.propertyTypeId}');"
										title="${pt.name}"
										<c:if test="${pt.propertyTypeId eq houseForm.propertyTypeId}">style="font-weight:bold"</c:if>>${pt.name}</a>
								</c:forEach>
							</div>
						</div>
					</div>
				</div>

			</div>
			<div class="list_contain">

				<div class="listing">


					<div class="search-result2 box">
						<div class="search_bottom">
							<div class="totalnum">
								找到相关房子<strong>${pageView.totalrecord}</strong>套
							</div>
							<div class="sortby">
								<div class="sea_bot_sort">
									<div class="sort_title">排序：</div>
									<div class="div_select select_w_125px" id="listSort">
										<div class="div_sel_text">
											<bean:message
												key="info.house.orderby.${houseForm.orderBy == null || houseForm.orderBy == '' ? 'isHot_desc' : houseForm.orderBy}" />
										</div>
										<ul id="listsortItems" style="width: 115px;">
											<li id="isHot_desc"><a
												href="javascript:setOrderBy('isHot_desc');"> <bean:message
														key="info.house.orderby.isHot_desc" /> </a></li>

											<li id="rentPrice_asc"><a
												href="javascript:setOrderBy('rentPrice_asc');"> <bean:message
														key="info.house.orderby.rentPrice_asc" /> </a></li>
											<li id="rentPrice_desc"><a
												href="javascript:setOrderBy('rentPrice_desc');"> <bean:message
														key="info.house.orderby.rentPrice_desc" /> </a></li>

											<li id="publishTime_asc"><a
												href="javascript:setOrderBy('publishTime_asc');"> <bean:message
														key="info.house.orderby.publishTime_asc" /> </a></li>
											<li id="publishTime_desc"><a
												href="javascript:setOrderBy('publishTime_desc');"> <bean:message
														key="info.house.orderby.publishTime_desc" /> </a></li>
										</ul>
									</div>
								</div>
							</div>
						</div>

					</div>

					<div style="clear: both;"></div>
					<ol id="list_body">
						<c:forEach var="h" items="${pageView.records}">
							<li id="li_apf_id_12">
								<div class="property2" id="apf_id_12">
									<div class="photo">
										<a href="<%=basePath %>sks/house.do?method=info&houseId=${h.houseId}&menuName=houseListRent" class="photo" title="${h.title}" target="_blank"><img
											class="thumbnail" id="apf_id_13_a" alt="${h.title}"
											src="<%=basePath%>${h.pictures['0'].fullPathName}"
											onerror="this.src='<%=basePath%>sks/img/frontpages/nohouse.jpg'"
											width="150" height="104" />
										</a>
									</div>
									<div class="details">
										<h4>
											<a id="comm_name_qt_apf_id_12" href="<%=basePath %>sks/house.do?method=info&houseId=${h.houseId}&menuName=houseListRent" target="_blank">${h.title}</a>&nbsp;
										</h4>
										<address id="comm_addr_qt_apf_id_12">
											<span
												style="overflow: hidden; float: left; font-family: Simsun">[<c:forEach
													var="ta" items="${areaPageView}">
													<c:if test="${ta.areaId == building.area.areaId}">
				${ta.parentArea.name}
		</c:if>
												</c:forEach>--${building.name }]&nbsp;${h.address }</span>

										</address>

										<p class="date">

											<span> 房型：${h.houseType.name }&nbsp;&nbsp; </span> <span>
												<c:if test="${h.rentMode == 0 }">整租  </c:if> <c:if
													test="${h.rentMode == 1 }">整租  </c:if> <c:if
													test="${h.rentMode == 2 }">整租、合租  </c:if> </span> <span>
												&nbsp;&nbsp; 楼层：${h.floorAt }/${h.floorAll } </span>
										</p>
									</div>
									<div class="price" style="line-height: 22px;">
										<span id="comm_price_qt_apf_id_12"><strong>${h.rentPrice}</strong></span>
										&nbsp;元/平米
									</div>

								</div></li>
						</c:forEach>
					</ol>																																
<fy:page actionPath="sks/districtInfo.do?method=houseRentList&menuName=village&buildingId=${building.buildingId }" isNewForm="false" formName="houseForm" curPageNo="${pageView.currentpage}" pageSize="${pageView.maxresult}" totalRows="${pageView.totalrecord}"/>
					<div class="multi_page_div"></div>

					<div style="clear: both;"></div>

				</div>
				<div class="side_content">
				<div class="historybox nolist">
					<h4 style="margin-bottom: 5px;">你最近浏览过的房源</h4>
					<table id="historyhouse"></table>
				</div>
				<div id="IFX_p13" style="clear: both; margin: 15px 0 15px 0px;"></div>
				<div
					style="width: 210px; height: 220px; margin: 0 auto; padding: 9px 0 9px 9px; margin-top: 5px;"
					id="adanjuke_zoneid_comm_001"></div>
				</div>	
			</div>
		</form>
		<div id="clear"></div>
		<div class="blank10"></div>
		<!-- footer starts here -->
		<jsp:include page="../rooster.jsp"></jsp:include>
		<!-- footer ends here -->
	</div>

</body>
<script type="text/javascript">
changeMenu('<%=menuName%>');
function getHistoryHouse() {
	$.ajax({
        type : "POST",
        url : "/sks/house.do",
        data : "method=history",
        dataType : "text",
        success : callback
    });
}
function callback(data) {
	var obj = $('#historyhouse');
	obj.html(data);
}
getHistoryHouse();
</script>
<script type="text/javascript">
$(document).ready(function(){
	toLoginstatus();
});

function toLoginstatus(){
	var user =  '${user}';
	if(user!="nobody"){
		$.cookie("individual",user,{expires:1});
	}
}
</script>
</html>